home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wics.zip
/
DEDTWIN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-05
|
3KB
|
89 lines
//==============================================================================================
//
// WICS Demonstration Application
// Version 1.00
//
// DEMO.CPP main application code file
// February 1993
//
//==============================================================================================
//
// Abstract:
//
//
//==============================================================================================
#ifndef _DEDTWIN_H
#define _DEDTWIN_H
#include <owl.h>
#include <wics.h>
#include <demorc.h>
#include <demo.h>
#include <eframe.h>
#include <filewnd.h>
_CLASSDEF (TDemoEditWindow)
_CLASSDEF (TDemoPrintedPage);
class TDemoPrintedPage : public TPrintedPage
{
PTEdit AnEditor;
LOGFONT FAR *lpLogFont;
int iLine;
int iOffsetToLine;
BOOL fAnotherPage;
public:
TDemoPrintedPage (Pchar ATitle, PTEdit pe, LOGFONT FAR * lplf);
virtual void PrintPage (HDC hDC, WORD page, POINT size, POINT dpi);
virtual BOOL IsNextPage() { return fAnotherPage; }
};
class TDemoEditWindow : public TFileWindow
{
private:
HFONT hFont;
COLORREF rgbTextColor;
LOGFONT lf;
FINDREPLACE fr;
virtual PTExtendedMDIFrame GetParent () { return (PTExtendedMDIFrame) Parent; } ;
protected:
virtual LPSTR GetClassName() { return "DEMOEDTWIN"; }
virtual void SetupWindow() ;
virtual void CheckMenu (UINT id) { GetParent()->CheckMenu(id); }
virtual void UncheckMenu (UINT id) { GetParent()->UncheckMenu(id); }
virtual void EnableMenuEntry(UINT id) { GetParent()->EnableMenuEntry(id); }
virtual void DisableMenuEntry(UINT id) { GetParent()->DisableMenuEntry(id); }
virtual void FindEditorText () { Editor->Search (-1, fr.lpstrFindWhat, fr.Flags & FR_MATCHCASE); }
virtual void ReplaceEditorText();
virtual void ReplaceAllEditorText();
virtual void CMChangeFont (RTMessage) = [CM_FIRST + CM_CHANGEFONT];
virtual void CMBold (RTMessage) = [CM_FIRST + CM_BOLD];
virtual void CMItalic (RTMessage) = [CM_FIRST + CM_ITALIC];
virtual void CMFontChanged (RTMessage) = [CM_FIRST + CM_FONTCHANGED];
virtual void CMFontSizeChanged (RTMessage) = [CM_FIRST + CM_FONTSIZECHANGED];
virtual void WMCommand (RTMessage) = [WM_FIRST + WM_COMMAND];
virtual void CMFileSaveAs (RTMessage) = [CM_FIRST + CM_FILESAVEAS];
virtual void CMPrint(RTMessage) = [CM_FIRST + CM_PRINT];
virtual void CMFind (RTMessage) = [CM_FIRST + CM_FIND];
virtual void CMReplace (RTMessage) = [CM_FIRST + CM_REPLACE];
virtual void ENSetFocus ();
virtual void ENKillFocus ();
public:
TDemoEditWindow (PTWindowsObject AParent, LPSTR ATitle, LPSTR AFile);
~TDemoEditWindow ();
virtual void GetWindowClass(WNDCLASS& WndClass);
virtual PTPrinter GetPrinter() { return ((PTExtendedMDIFrame)GetParent())->GetPrinter(); }
virtual void DefWndProc(RTMessage Msg);
};
#endif